package com.ndp.fb.scheduler.job.audience;

import com.alibaba.dubbo.config.annotation.Reference;
import com.ndp.fb.constant.ConfigConst;
import com.ndp.fb.mq.api.service.schedulerservice.audience.AudienceSchedulerService;
import com.ndp.fb.rdb.api.AudienceManagerRdbService;
import com.ndp.fb.scheduler.annotation.CronScheduled;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * Created by sisi.chen on 2016/4/28.
 */
@Component
public class AudienceJob {
    @Reference
    private AudienceSchedulerService audienceSchedulerService;

    /**
     * 定时刷新受众模板的人数
     */
    @CronScheduled(cronkey = ConfigConst.REFRESH_AUDIENCE_USER_CRON, enablekey = ConfigConst.REFRESH_AUDIENCE_USER_ENABLE)
    public void refreshUser() {
        audienceSchedulerService.refreshUser();
    }
}
